package com.yitao.cms.exception;

/**
 * Function:
 * Date: 2018/12/25
 *
 * @author skipper
 * @desc 系统运行期异常
 * @see
 */
@SuppressWarnings("serial")
public class YiTaoCmsRuntimeException  extends RuntimeException{
    private static final String _code = "500";
    private static final String _message="后台系统处理异常";
    private String message;
    private String code;
    public YiTaoCmsRuntimeException() {
        this(null,null,null);
    }

    public YiTaoCmsRuntimeException(String message, Throwable cause) {
        this(null,message,cause);
    }


    public YiTaoCmsRuntimeException(String message) {
        this(null,message,null);
    }

    public YiTaoCmsRuntimeException(Throwable cause) {
        this(null,null,cause);
    }

    public YiTaoCmsRuntimeException(String code,String message)
    {
        this(code,message,null);
    }

    public YiTaoCmsRuntimeException(String code,String message,Throwable cause)
    {
        super(message,cause);
        this.code = (code==null||"".equals(code.trim()))?_code:code;
        this.message = (message==null||"".equals(message.trim()))?_message:message;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
